import request from '@/utils/request'

/**
 * // 分页获取评论
 * @param params{ page: 1, limit: 10 }默认值
 * @returns {AxiosPromise}
 */
export function getComment(params = { page: 1, limit: 10 }) {
  return request({
    url: '/api/comment',
    method: 'GET',
    params
  })
}

// 删除评论
export function delComment(id) {
  return request({
    url: `/api/comment/${id}`,
    method: 'delete'
  })
}
